const nodemailer = require("nodemailer");

class Mailer {
  constructor(transportOptions) {
    this.transport = nodemailer.createTransport(transportOptions);
    this.sender = transportOptions.auth.user;
  }

  async send(mailOptions) {
    return this.transport.sendMail(mailOptions);
  }
}

module.exports = Mailer;